#ifndef __MB_H__
#define __MB_H__
#include <rtdevice.h>

#define MB_INPUT_REG_START     0x1000
#define MB_INPUT_REG_NUM       10
#define MB_HOLD_REG_START      0x0000
#define MB_HOLD_REG_NUM        108

extern struct rt_messagequeue mb_rx_mq;

extern rt_uint16_t regInBuf[MB_INPUT_REG_NUM];
extern rt_uint16_t regHoldBuf[MB_HOLD_REG_NUM];


void mb_init(void);
void mb_poll(void);
void mb_set_baudrate(rt_uint32_t baudrate);
void mb_set_slaverAddr(rt_uint8_t slaverAddr);
void mb_set_crcEnable(rt_uint8_t crcEnable);

#endif /* __MB_H__ */
